<!--{include manage/header}-->
<script type="text/javascript" src="../static/js/public.js"></script>
<body style="background-color:rgb(239, 239, 239);color: #6699FF">
<form method="POST" name="theForm" id="theForm" action="index.php?action=infos&file=personal&submit=true">
	<div style="height: 300px;" id="game_content">
	    <div style="padding: 10px;" id="game_base">
	        <table width="100%" >
			  <tbody>
			  <tr >
			    <td class="label">用户名：</td>
			    <td align="left">{$userInfo['username']}</td>
			  </tr>
			  <tr >
			    <td class="label">邮箱：</td>
			    <td align="left">
			      <input gtbfieldid="1" name="email" id="message_title" size="40" class="easyui-validatebox validatebox-text" required="true" missingmessage="不能为空" type="text" value="{$userInfo['email']}"  validType="email">			    </td>
			  </tr>
			  <tr>
				<td class="label">登录密码</td>
				<td align="left">
				  <input id="password" name="password" size="30" class="easyui-validatebox" required="true" missingmessage="登录密码不能为空" type="password" value="******">
				</td>
			  </tr>
			  <tr>
				<td class="label">确认密码</td>
				<td align="left">
				  <input id="repwd" size="30" class="easyui-validatebox" required="true" missingmessage="确认密码，请保持两次输入一致" type="password"  value="******">
				</td>
			  </tr>
		  </tbody>
		  </table>
	    </div>
	</div>
    <div style="padding: 5px; text-align: center; background: none repeat scroll 0% 0% rgb(239, 239, 239);">
    	<input value="修改资料" type="submit">
    </div>
</form>
<script>
$('#theForm').form({
    onSubmit:function(){
        var chk = $(this).form('validate');
        if(chk){
        	if($("#repwd").val()!==$("#password").val()){
        		$("#repwd").val("").focus();
        		return false;
        	}        	return true;
        }else{
        	return false;
        }
    },
    success:function(data){
    	JSONData = $.evalJSON(data);
    	if(JSONData.status=="success"){
			alert('资料修改成功');
			window.parent.$('#tabs').tabs('close','个人资料');
    	}else{
    		$.messager.alert('提示信息', JSONData.msg );
    	}
    }
});
</script>
</body>
</html>